Combine two Ajax requests that runs on two separate events